<%@ page language="java"
	import="java.util.*,java.sql.*,com.gxuwz.medical.domain.Role,java.util.List"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title></title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

</head>

<body>
	<table id="table1" align="center" border="1" width="50%"
		cellpadding="6">
		<tr>
			<th colspan="6" align="center">查询到的用户信息</th>
			<%--th加粗， cellpadding和android padding含义一样--%>
		</tr>
		<tr>
			<th align="center">ID</th>
			<th align="center">名称</th>
			<th align="center">操作</th>
		
		</tr>
		<%
			//获取图书信息集合	
			List<Role> list = (List<Role>) request.getAttribute("list");
			if (list == null || list.size() < 1) {
				out.print("没有数据 ");
			} else {
				for (Role role : list) {
		%>
		<tr align="center">
			<td><%=role.getRoleid()%></td>
			<td><%=role.getRoleName()%></td>
			
			<td>
				<form action="RoleupdateServlet" method="post">
					<input type="hidden" name="roleid" value="<%=role.getRoleid()%>"> 
					<a href="page/role/role_update.jsp"><input type="submit"  value="修改"></a></form>
					<form action="RoledeleteServlet" method="post">
					<input type="hidden" name="roleid" value="<%=role.getRoleid()%>"> 
					<input type="submit" value="删除">
				</form></td>
				<td>
			<a href="page/role/role_add.jsp"><input type="submit" value="添加用户"></a></td>
		</tr>
		<%
			}
			}
		%>
	</table>

</body>
</html>
